﻿<orchestra:DocumentView x:Class="Orchestra.Modules.DataGrid.Views.DataGridView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:orchestra="http://orchestra.codeplex.com"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:TableView="clr-namespace:TableView;assembly=TableView"
    xmlns:ViewModels="clr-namespace:Orchestra.Modules.DataGrid.ViewModels"
    xmlns:Models="clr-namespace:Orchestra.Modules.DataGrid.Models"
    mc:Ignorable="d"
    d:DataContext="{d:DesignInstance ViewModels:DataGridViewModel}"
    d:DesignHeight="473"
    d:DesignWidth="598">

    <orchestra:DocumentView.Resources>

        <DataTemplate DataType="{x:Type Models:StringCell}">
            <TextBox Text="{Binding Path=Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                Margin="0" BorderThickness="0" />
        </DataTemplate>

    </orchestra:DocumentView.Resources>

    <Grid>
        <TableView:TableView x:Name="_tableView"
            ItemsSource="{Binding Items}"
            ColumnsSource="{Binding Columns}"
            ShowHorizontalGridLines="True"
            ShowVerticalGridLines="True"
            GridLinesBrush="DarkGray"
            FocusedRowIndex="{Binding SelectedRowIndex}">
        </TableView:TableView>
    </Grid>
</orchestra:DocumentView>